package apigateway.project.core.filter.loadbalance;

import apigateway.project.commen.config.ServiceInstance;
import apigateway.project.core.context.GlobalContext;

/**
 * 负载均衡接口
 */
public interface LoadBalanceGatewayRule {

    /**
     * 通过上下文参数获取服务实例
     * @param ctx
     * @return
     */
    @Deprecated
    ServiceInstance choose(GlobalContext ctx);

    /**
     * 通过服务名称拿到对应的服务实例
     * @param serviceName
     * @return
     */
    ServiceInstance choose(String serviceName);

}
